package test;

import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.Arrays;

public class Solution {

    public static int gcd(int a, int b) {
        return b == 0 ? a : gcd(b, a%b);
    }

    public static int findGCD(int[] nums) {
        int minn = nums[0];
        int maxn = nums[0];
        for (int i = 0; i < nums.length; i++) {
            if (nums[i] > maxn) maxn = nums[i];
            if (nums[i] < minn) minn = nums[i];
        }
        return maxn / gcd(minn,maxn) * minn;

    }

    public static String solve (int M, int N) {
        String str = Integer.toString(M,N);

        return str.toUpperCase();
    }

    public static String binaryAdd (String A, String B) {
        BigInteger a = new BigInteger(A,2);
        BigInteger b = new BigInteger(B,2);
        BigInteger ans = a.add(b);

        return ans.toString(2);
    }




    public static void main(String[] args) {

//        System.out.println(solve(-20,26));
        System.out.println(binaryAdd("101","1"));
    }
}
